<!DOCTYPE html>
<html class="um landscape min-width-240px min-width-320px min-width-480px min-width-768px min-width-1024px">
<head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<meta http-equiv="Content-Language" content="UTF-8" />
    <meta name="viewport" content="target-densitydpi=device-dpi, width=device-width, initial-scale=1, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">    <link rel="stylesheet" href="jgp/css/project/ui-input-v3.css">
    <link rel="stylesheet" href="jgp/css/project/ui-btn-v3.css">
    <link rel="stylesheet" href="jgp/css/project/ui-res-v3.css">
    <link rel="stylesheet" href="jgp/css/project/ui-color-v3.css">
    <link rel="stylesheet" href="jgp/css/ui-input.css">
    <link rel="stylesheet" href="jgp/css/ui-btn.css">
    <link rel="stylesheet" href="jgp/css/ui-img.css">
    <link rel="stylesheet" href="jgp/css/ui-res.css">
    <link rel="stylesheet" href="jgp/css/ui-list.css">
    <link rel="stylesheet" href="jgp/css/ui-base.css">
    <link rel="stylesheet" href="jgp/css/ui-box.css">
    <link rel="stylesheet" href="jgp/css/ui-color.css">
	<link rel="stylesheet" href="jgp/css/my.css">
	<link rel="stylesheet" href="jgp/css/iBox.css">
	
    <script src="jgp/js/zy_control.js"></script>
    <script src="jgp/js/zy_click.js"></script>
    <script src="jgp/js/common.js"></script>
    <script src="jgp/js/jquery-1.8.3.min.js"></script>
    <script src="jgp/js/zy_event.js"></script>
	<script src="jgp/js/pbd.js"></script>
	<script src="jgp/js/iBox.js"></script>
	<script src="js/talkingdata.js"></script>
</head>
<body class="um-vp  res19 ub-img2" ontouchstart>
     <!--块容器开始-->
	<div class="ub ub-ver uba up">
		<div class="uinn umar-t1"></div>
		<div class="uinn "></div>
	    <div class="uinn uc-t1 ">
	    <div class=" res22 ub-img umw1-7 umh1-7 uinn uc-t1 umar-t1 ub"></div>
	    </div>
	    <div class=" ub-f4 uinn ">
	    	<!--块容器开始-->
			<div class="ub ub-ver">
			    <div class="uinn uc-t1">
			    	<!--文本输入开始-->
				    <div class="ub t-bla ulab c-blu6">
					    <div class="uinn2  res24 ub-img umar-l"> </div>
					    <div class="ub-f1 uinput uinn ub ub-ac">
					        <input placeholder="员工号" type="text" class="uc-a1 " id="userName"  value="">
					    </div>
				    </div>
			        <!--文本输入结束-->
			    </div>
			    <div class="uinn ">
			    	<!--文本输入开始-->
					<div class="ub t-bla ulab umar-b1 c-blu6">
					     <div class="uinn2  res23 ub-img umar-l"> </div>
					    <div class="ub-f1  uinput uinn ub ub-ac">
					        <input placeholder="密   码" type="password" class="uc-a1" id="userPass"  value="">
					    </div>
					</div>
			        <!--文本输入结束-->
			    </div>
				<div class=" uinn ">
					<!--按钮开始-->
					<div  class="touming btn uba b-org uinn11 c-red  t-wh  tx-c" onclick="showList()">登录</div>
					<!--按钮结束-->
				</div>
			    <div class=" uinn uc-b1">
			    	<!--按钮开始-->
					<div  class="touming btn uba b-org uinn11 c-red  t-wh  tx-c" onclick="finishWidget()">退出</div>
					<!--按钮结束-->
			    </div>
			</div>
			<!--块容器结束-->
	    </div>
		<!--块容器开始-->
	<div class="ub  t-bla">
	    <div class="ub-f1 uinn uc-l1"></div>
	    <div class="ub-f1 uinn"></div>
	    <div class="uinn uc-r1 t-gra">版本号：00.00.0001</div>
	</div>
	<!--块容器结束-->
	    <div class=" uinn uc-b1"></div>
	</div>
	<!--块容器结束-->
  
 <div id="diyLoadDiv" class="uhide"></div>
</body>
<script>
    zy_init();
    window.uexOnload = function (type) {
        if (!type) {
			IC.talkingDataCount("机供品","0005");
				deleteAll();//删除过期数据
				//触发Android返回键 注销并退出到登录界面
        }
    }
	
          
	//程序退出
	function finishWidget(){
		IC.talkingDataCount("机供品","0005");
　　　           uexWidget.finishWidget("");
			}
    //用户登录
    function showList() {
		IC.talkingDataCount("机供品","0005");
		var user=$$("userName").value;
		setStorage("userName",user);
		var pass=$$("userPass").value;
		  if (!user || !pass) {
                uexWindow.alert("提示消息", "请输入用户名和密码", "确定");
                return;
            }
	     $.iBoxWait();
        var param  = {"userName":user,"passWord":pass};
      $.ajax({
        url : loginUrl,
        type : "post",
		data : param,
        dataType:"json",  
        success: function(data){
					if(JSON.stringify(data)=="{}"){
						 $.iBoxMsg("账号或密码错误");
					}
				else if (data.status==0) {
				 	    $.iBoxHide();
						setStorage("userId",data.array.userId);
						var kf = data.array.wareHouse;
						setStorage("kf",JSON.stringify(kf));
						uexWindow.open("Flight", 0, "jgp_Flight.html", 2, "", "", 0);
					}else if(data.status==1){
						 $.iBoxMsg("账号或密码错误");
					}else if(data.status==2){
						 $.iBoxMsg(data.desc);
					}else{
						 $.iBoxMsg("网络异常，请重试");
					}
		       },
			   error: function(data){
			   	 $.iBoxMsg("服务器无响应");
			   }
			})
    }
    </script>
</html>
